package com.family.model.result;

import java.io.Serializable;

/**
 * 返回前端结果
 *
 * @param <T>
 */
public class ResultModel<T> implements Serializable {

    /**
     * 结果状态
     */
    private int stateCode = StateCode.RESULT_OK;

    /**
     * 错误提示
     */
    private String prompt;

    private String errorMessage;

    /**
     * 正确时的数据
     */
    private T data;

    public int getStateCode() {
        return stateCode;
    }

    public void setStateCode(int stateCode) {
        this.stateCode = stateCode;
    }

    public String getPrompt() {
        return prompt;
    }

    public void setPrompt(String prompt) {
        this.prompt = prompt;
    }

    public String getErrorMessage() {
        return errorMessage;
    }

    public void setErrorMessage(String errorMessage) {
        this.errorMessage = errorMessage;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}
